<template>
  <div>
    <v-header></v-header>
    <router-view></router-view>
    <v-footer></v-footer>
    <VlefINvitation class="leftNvit" ref="lefINvitation" @buttop="buttop" v-if="!mobilePc"></VlefINvitation>
  </div>
</template>

<script>
import header from "@/components/Head";
import footer from "@/components/Foot";
import lefINvitation from "@/components/lefINvitation";
import { clieentWidth } from "./../utils/clientwidth";
export default {
  name: "home",
  data() {
    return {
      mobilePc: false
    };
  },
  components: {
    VHeader: header,
    VFooter: footer,
    VlefINvitation: lefINvitation
  },
  methods: {
    // 回到顶部
    buttop(val) {
      if (val) {
        document.documentElement.scrollTop = 0;
      }
    },
    ismobilePc() {
      if (clieentWidth()) {
        this.mobilePc = true;
      } else {
        this.mobilePc = false;
      }
    }
  },
  created() {
    this.ismobilePc();
  }
};
</script>

<style scoped>
@import url("../assets/nvit.scss");
</style>
